#ifndef __SINGLETON_H__
#define  __SINGLETON_H__

template <class T>
class SingleTon
{
public:
  SingleTon()
  {
  }
  static T* Instance()
  {
    if(!mInstance)
    {
      mInstance = new T();
    }
    return mInstance;
  }
private:
  static T* mInstance;
};

template<class T>
T* SingleTon<T>::mInstance = NULL;

#endif
